package com.ajx.blog.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/*
 * @Author: 姜东浩
 * @Date: 2022-04-22 23:52:23
 * 
 * @Description: 菜单类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "menu")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id; // 菜单主键id

    @TableField(value = "pername")
    private String pername; // 菜单名称

    @TableField(value = "perdesc")
    private String perdesc; // 菜单desc

    @TableField(value = "url")
    private String url; // 菜单路径

    @TableField(value = "parent_id", updateStrategy = FieldStrategy.IGNORED) // 新值可以为NULL、空字符串
    private Integer parentId; // 父级菜单id

}
